# 备忘录
class Memento(object):
    def __init__(self, state):
        self._state = state

    def setState(self, state):
        self._state = state

    def getState(self):
        return self._state
